<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>查看</title>
    <style>
        .timeline {
            padding-bottom: 10px;
        }
        .timeline-item {
            margin-top: 8px !important;
            background-color: #fbfbfb!important;
        }

        .timeline li .label-step {
            display: inline-block;
            min-width: 80px;
            font-size: 100%;
            background-size: 100% 100%;
            background-color: #4d7fad;
        }

        .timeline .label-time {
            background-color: #afbdcd!important;
        }

        .timeline-header {
            background: #f1f1f1;
            color: #0a6aa1;
            font-size: 15px !important;
        }

        .timeline-body p span {
            vertical-align: middle;
        }

        li .label {
            padding: .3em .6em .3em !important;
        }

        .fa {
            margin-right: 4px;
        }

        body.is-dialog, #main {
            background: #ecf0f5 !important;
        }

        legend {
            padding-bottom: 5px;
            font-size: 14px;
            padding-right: 15px;
        }

        .span-content {
            margin-left: 8px;
            vertical-align: middle;
        }

        .timeline-header a {
            font-size: 80%;
            margin-left: 4px;
        }
        .main-content .tab-content{
            height: calc(100vh - 106px)!important;
            overflow: auto;
            overflow-x: hidden;
            padding: 10px 0 0 10px!important;
        }
    </style>
</head>
<body>
<div class="row main-content">
    <div id="fastflow-left-content" class="col-md-6 col-lg-6 col-sm-6">
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#detail-timeline" data-toggle="tab" aria-expanded="true">时间线</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active">
                    <ul class="timeline">
                        {volist name='logs' id='log'}
                        <li class="time-label">
                            <span class="label label-time">{$key}</span>
                        </li>
                        {volist name='log' id='row'}
                        <li>
                            <span class="label label-step"><i class="fa fa-tasks"></i>{$row['step_name']}</span>
                            <div class="timeline-item">
                                <span class="time"><i class="fa fa-clock-o"></i> {$row['longtime']}</span>
                                <div class="timeline-header">
                                    <label style="font-weight:300;">
                                        {if $row['check_type']==6}流程结束：{elseif $row['check_type']==5}发起人：{else /}审批人：{/if}
                                        <span class="text-warning">{$row['worker_name']}</span>
                                    </label>
                                    {if $row['check_type']==1}<a class="btn btn-success-light btn-xs">同意</a>{/if}
                                    {if $row['check_type']==2}<a class="btn btn-danger-light btn-xs">驳回</a>{/if}
                                    {if $row['check_type']==3}<a class="btn btn-info-light btn-xs">发起会签</a>{/if}
                                    {if $row['check_type']==5}<a class="btn btn-success-light btn-xs">发起审批</a>{/if}
                                    {if $row['is_agency']==1}<a class="btn btn-info-light btn-xs">代理</a>{/if}
                                </div>
                                <div class="timeline-body">
                                    <div style="margin-left: 10px;">
                                        {if $row['check_type']==6}
                                        <p><a class="btn btn-warning btn-xs" style="font-size: 80%">流程结束</a></p>
                                        {elseif $row['check_type']==4}
                                        <p><a class="btn btn-warning btn-xs" style="font-size: 80%">审批被强制终止</a></p>
                                        {else /}
                                        <legend>
                                            <div class="row">
                                                {if $row['is_agency']==1}
                                                <div class="col-xs-12 col-sm-6" style="margin-bottom: 8px;">
                                                    <span class="label label-info text-bold"><i class="fa fa-user"></i>代理人(组)</span>
                                                    <span class="span-content">
                                    {$row['agent']}
                                </span>
                                                </div>
                                                <div class="col-xs-12 col-sm-6" style="margin-bottom: 8px;">
                                                    <span class="label label-info text-bold"><i class="fa fa-user"></i>被代理人(组)</span>
                                                    <span class="span-content">
                                    {$row['principal']}
                                </span>
                                                </div>
                                                {/if}
                                            </div>
                                        </legend>
                                        {if $row['check_type']==2}
                                        <p>
                                            <span class="text-bold"><i class="fa fa-mail-reply text-danger"></i>驳回步骤：</span>
                                            <span class="text-info">{$row['back_steps']}</span>
                                        </p>
                                        {/if}
                                        {if $row['check_type']==3}
                                        <p><span class="text-bold"><i class="fa  fa-user text-success"></i>会签人员：</span>
                                            <span class="text-info">{$row['sign_worker']}</span>
                                            <span class="text-success">
                            {php}
                            if(count(explode(',',$row['sign_worker']))>1){
                                if($row['sign_checkmode']==1){
                                    echo '(联合会签)';
                                }
                                else{
                                    echo '(任一会签)';
                                }
                            }
                            {/php}
                        </span>
                                        </p>
                                        {/if}
                                        <p><span class="text-bold"><i class="fa fa-pencil-square-o text-warning"></i>审批内容：</span>{$row['check_content']}
                                        </p>
                                        {if $row['file']!=''}<p><span class="text-bold"><i
                                            class="fa  fa-file-text-o text-gray"></i>资料下载：</span><a href="{$row['file']}"
                                                                                                    class="btn btn-info-light btn-xs">{$row['file_name']}</a>
                                    </p>{/if}
                                        {/if}
                                    </div>
                                </div>

                            </div>
                        </li>
                        {/volist}
                        {/volist}

                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div id="fastflow-right-content" class="col-md-6 col-lg-6 col-sm-6">
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#bill-edit" data-toggle="tab" aria-expanded="true">单据</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="bill-edit"></div>
            </div>
        </div>
    </div>
</div>


</body>
</html>
